package com.ruyue.csinstall.model;

import com.ruyue.csinstall.utils.CsInstallEnv;

/**
 * @author xiawl
 * @create 2017/7/23 15:14.
 */
public class CsPro {
    private String backupPath;//备份的通讯机路径
    private String packagePath;//升级包路径(.zip结尾)
    private String unZipPath;//升级包解压放在哪个目录下

    public String getBackupPath() {
        String backupPath = CsInstallEnv.getvalue("backupPath");
        if (backupPath.endsWith("\\") || backupPath.endsWith("/")) {//去掉路径最后误配的分隔符
            backupPath = backupPath.substring(0, backupPath.length() - 1);
        }
        return backupPath;
    }

    public String getPackagePath() {
        String packagePath = CsInstallEnv.getvalue("packagePath");
        if (packagePath.endsWith("\\") || packagePath.endsWith("/")) {//去掉路径最后误配的分隔符
            packagePath = packagePath.substring(0, packagePath.length() - 1);
        }
        return packagePath;
    }

    public String getUnZipPath() {
        String unZipPath = CsInstallEnv.getvalue("unZipPath");
        if (unZipPath.endsWith("\\") || unZipPath.endsWith("/")) {//去掉路径最后误配的分隔符
            unZipPath = unZipPath.substring(0, unZipPath.length() - 1);
        }
        return unZipPath;
    }
}